<div class="app-content-body ">   
    <div class="bg-light lter b-b wrapper-md hidden-print">
      <h1 class="m-n font-thin h3">订单</h1>
    </div>
    <div class="crud-container crud-reset">
		<div class="row" style="margin-right: 0; margin-left: 0;">
			<div class="input-group col-sm-3 pull-right">
          	  <input type="text" class="input-sm form-control" placeholder="Search">
	          <span class="input-group-btn">
	            <button class="btn btn-sm btn-default" type="button">查询</button>
	          </span>
	        </div>
		</div>
		<div class="row">
			<div class="col-sm-5" id='order_select'></div>
		</div>
		<div id='order_list'></div>
	</div>
</div>
<script>
	$(function() {
    $("#content").one("route.loaded", function(e, context) { 
    	var dataSource = new DevExpress.data.DataSource({
        store: $.crudStore(API('restful?_model=order'))
      });
    	var ordertype=[{name:'全部',id:1},{name:'普通订单',id:2},{name:'赠送订单',id:3}];
    	var orderstate=[{name:'全部',id:7},{name:'待支付',id:0},{name:'待发货',id:1},{name:'已取消',id:2},{name:'未领取',id:3},{name:'已过期',id:4},{name:'已发货',id:5}]
    	$("#order_select").dxBox({
    		align:'start',
    		dataSource:dataSource,
    		items:[{
    			itemType:"group",
    			items:[{
    				label:{text:"订单类型"},
    				editorType:'dxSelectBox',
    				editorOptions:{
    					items:ordertype,
    					displayExpr:'name',
    					valueExpr:'id',
    					value:ordertype[0].id,
    					onValueChanged:function(e){
    						console.log(e.value)
    					}
    				}
    			},{
    			  label:{text:"订单状态"},
    			  editorType:'dxSelectBox',
    			  editorOptions:{
    			  	items:orderstate,
    			  	displayExpr:'name',
    			  	valueExpr:'id',
    			  	value:orderstate[7].id,
    			  	onValueChanged:function(e){

    			  	}
    			  }
    			},{
    			  label:{text:"开始时间"},
    			  editorType:'dxSelectBox',
    			  editorOptions:{
    			  	items:orderstate,
    			  	displayExpr:'name',
    			  	valueExpr:'id',
    			  	value:orderstate[7].id,
    			  	onValueChanged:function(e){
    			  		
    			  	}
    			  }
    			},{
    			  label:{text:"结束时间"},
    			  editorType:'dxSelectBox',
    			  editorOptions:{
    			  	items:orderstate,
    			  	displayExpr:'name',
    			  	valueExpr:'id',
    			  	value:orderstate[7].id,
    			  	onValueChanged:function(e){
    			  		
    			  	}
    			  }
    			}]
    		}]
    	})
    	

    var 
    })})
</script>